<%@page import="model.entity.Comment"%>
<%@page import="java.util.List"%>
<%@page import="model.DAO.CommentDAO"%>
<!DOCTYPE html>
<html>
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" type="text/css" href="../css/styles.css">
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css">
        <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
        <script src="http://code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
        <script>
            $(function () {
                $("#datepicker").datepicker({
                });
            });
        </script>
    </head>
    <body id="commentmanagementbody">
        <div id="contentManage">
            <h1>Comment Management</h1>
            <div class="clearfix" id="toolbar">
                <form id="searchPanel">Search Comment:
                    <input type="text" id="search_Comment"/>
                    <input type="submit" value="Filt"/>
                </form>
                <form id="sortPanel">
                    Sort list follow<input type="datetime" id="datepicker">
                </form>
            </div>
            <ul class="cmn_list" id="list_area">
                <li class="cmn_list_header">
                    <div class="postID cmn_list_td">PostID</div>
                    <!--<div class="title cmn_list_td">Title</div>-->
                    <!--<div class="date cmn_list_td">Date Post</div>-->
                    <div class="commentID cmn_list_td">CommentID</div>
                    <div class="comment_Content cmn_list_td">Comment Content</div>
                    <div class="accountID cmn_list_td">AccountID</div>
                    <div class="status cmn_list_td">Status</div>
                    <div class="checkBox cmn_list_td"></div>
                </li>

                <li class="cmn_list_tr">
                    <div class="postID cmn_list_td">001</div>
                    <!--                    <div class="title cmn_list_td">Lau ca loc</div>
                                        <div class="date cmn_list_td">12-4-2014</div>-->
                    <div class="commentID cmn_list_td">00001</div>
                    <div class="comment_Content cmn_list_td">aaaaaaaaaaaaaaa</div>
                    <div class="accountID cmn_list_td">AC001</div>
                    <div class="status cmn_list_td">khoa</div>
                    <div class="checkBox cmn_list_td">
                        <input type="checkbox" name="checkBox"/>
                    </div>
                </li>
                <%
                    List listComment = (List) request.getAttribute("list");
                    for (int i = listComment.size(); i > 0; i--) {
                        Comment comment = (Comment)listComment.get(i);
                        out.println("<li class=\"cmn_list_tr\">");
                        out.println("<div class=\"postID cmn_list_td\">" + comment.getPost_id() + "</div>");
                        out.println("<div class=\"commentID cmn_list_td\">" + comment.getCommentID() + "</div>");
                        out.println("<div class=\"comment_Content cmn_list_td\">" + comment.getContent() + "</div>");
                        out.println("<div class=\"accountID cmn_list_td\">" + comment.getUser_id() + "</div>");
                        out.println("<div class=\"status cmn_list_td\">" + comment.getStatus() + "</div>");
                        out.println("<div class=\"checkBox cmn_list_td\"><input type=\"checkbox\" name=\"checkBox\"/></div>");
                        out.println("</li>");
                    }
                %>
            </ul>
        </div>
    </body>
</html>